var xhr = new XMLHttpRequest();

var imgs = document.querySelectorAll('.iot_slide_img')

var points = document.querySelectorAll('.iot_slide_point')

xhr.addEventListener("readystatechange", function() {
   if(this.readyState === 4) {
        // console.log(this.responseText)
        let response = JSON.parse(this.responseText)
        let results = response.result
        for(let i=0;i<results.length;i++){
            let img_url = results[i].imgUrl
            imgs[i].src=img_url
        }
   }
});

xhr.open("GET", "https://pcapi-xiaotuxian-front.itheima.net/home/banner");

xhr.send();


